import {combineReducers} from 'redux'
import {SET_COUNT} from './actionType'
import Immutable from 'seamless-immutable'

const counter = (state = Immutable({count: 0}), action) => {
    switch (action.type) {
        case SET_COUNT: {
            return state.merge({
                count: action.count
            });
        }
        default: {
            return state
        }
    }
};

export default combineReducers({
    counter,
})